Skip to content

fix(language-server): replace unsupported ocache maxAge -1 with safe maximum - #153

Merged
9romise merged 1 commit into
npmx-dev:mainfrom
luo2430:fix/language-server
Aug 27, 2026
Merged

fix(language-server): replace unsupported ocache maxAge -1 with safe maximum#153
9romise merged 1 commit into
npmx-dev:mainfrom
luo2430:fix/language-server

Conversation

@luo2430

@luo2430 luo2430 commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

ocache dropped support for passing -1 to disable cache expiration. Introduce CACHE_MAX_AGE_MAXIMUM (largest valid 32-bit signed seconds) and use it for the workspace-context cache to keep entries from expiring.

屏幕截图 2026-08-23 163224

…afe maximum

`ocache` dropped support for passing `-1` to disable cache expiration.
Introduce `CACHE_MAX_AGE_MAXIMUM` (largest valid 32-bit signed seconds)
and use it for the workspace-context cache to keep entries from expiring.
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a21b174a-6edc-42b9-b26d-75b004da8e44

📥 Commits

Reviewing files that changed from the base of the PR and between d0df7d7 and 9fbd4af.

📒 Files selected for processing (2)
  • packages/language-core/src/constants.ts
  • packages/language-server/src/workspace.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change adds the exported CACHE_MAX_AGE_MAXIMUM constant. The constant represents the largest whole-number cache age supported by ocache’s 32-bit maxAge limit. The workspace-context cache now uses this constant instead of -1.

Merge Risk: ⚪ Minimal · up to 9fbd4

This localized change replaces the unsupported cache-expiration value with a valid maximum while preserving non-expiring workspace-context entries; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description accurately explains replacing the unsupported ocache value with CACHE_MAX_AGE_MAXIMUM for the workspace-context cache.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/language-core/src/constants.ts

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

packages/language-server/src/workspace.ts

ESLint skipped: the matched ESLint configuration already failed (missing-dependency).


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

luo2430 added a commit to luo2430/vscode-npmx-fork that referenced this pull request Aug 24, 2026
- Update publisher to luo2430
- Rename package to luo2430-npmx
- Switch icon to luo2430.jpg
- Add README note about temporary replacement status
luo2430 added a commit to luo2430/vscode-npmx-fork that referenced this pull request Aug 24, 2026
….com/luo2430/vscode-npmx-fork/issues/153)

- Update publisher to luo2430
- Rename package to luo2430-npmx
- Switch icon to luo2430.jpg
- Add README note about temporary replacement status
luo2430 added a commit to luo2430/vscode-npmx-fork that referenced this pull request Aug 24, 2026
…b.com/luo2430/vscode-npmx-fork/issues/153)](https://github.com/luo2430/vscode-npmx-fork/issues/153)

- Update publisher to luo2430
- Rename package to luo2430-npmx
- Switch icon to luo2430.jpg
- Add README note about temporary replacement status
luo2430 added a commit to luo2430/vscode-npmx-fork that referenced this pull request Aug 24, 2026
…b.com/luo2430/vscode-npmx-fork/issues/153)](https://github.com/luo2430/vscode-npmx-fork/issues/153)

- Update publisher to luo2430
- Rename package to luo2430-npmx
- Switch icon to luo2430.jpg
- Add README note about temporary replacement status
@9romise

9romise commented Aug 25, 2026

Copy link
Copy Markdown
Member

I couldn’t seem to find any documentation on this. Could you point me to the relevant link about this change in ocache?

@luo2430

luo2430 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

I couldn’t seem to find any documentation on this. Could you point me to the relevant link about this change in ocache?

@9romise unjs/ocache@183f36a

@9romise
9romise added this pull request to the merge queue Aug 27, 2026
Merged via the queue into npmx-dev:main with commit 6dfbb80 Aug 27, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants